/*
    libhdvbd - Library for building sophisticated DVB applications
    Copyright (C) 2012 Tony Houghton <h@realh.co.uk>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser general Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser general Public License for more details.

    You should have received a copy of the GNU Lesser general Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

#include "hdvb-stream-tap-iface.h"


GType
hdvb_stream_tap_get_type(void)
{
    static GType iface_type = 0;
    
    if (!iface_type)
    {
        static const GTypeInfo info = {
            sizeof (HdvbStreamTapInterface),
            NULL,   /* base_init */
            NULL,   /* base_finalize */
        };
        
        iface_type = g_type_register_static (G_TYPE_INTERFACE, "HdvbStreamTap",
                &info, 0);
    }
    return iface_type;
}


void
hdvb_stream_tap_add_packet(HdvbStreamTap *tap, const guint8 *data)
{
    g_return_if_fail(HDVB_IS_STREAM_TAP(tap));
    HDVB_STREAM_TAP_GET_INTERFACE(tap)->add_packet(tap, data);
}

void
hdvb_stream_tap_src_closed(HdvbStreamTap *tap)
{
    g_return_if_fail(HDVB_IS_STREAM_TAP(tap));
    HDVB_STREAM_TAP_GET_INTERFACE(tap)->src_closed(tap);
}

const HdvbServicePidsInfo *
hdvb_stream_tap_get_pids_info(HdvbStreamTap *tap)
{
    g_return_val_if_fail(HDVB_IS_STREAM_TAP(tap), NULL);
    return HDVB_STREAM_TAP_GET_INTERFACE(tap)->get_pids_info(tap);
}
